← Back
Editing: index-legacy96.js
!function(){function e(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,n,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.toStringTag||"@@toStringTag";function u(t,a,o,l){var u=a&&a.prototype instanceof c?a:c,s=Object.create(u.prototype);return r(s,"_invoke",function(t,r,a){var o,l,u,c=0,s=a||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(n,t){return o=n,l=0,u=e,f.n=t,i}};function v(t,r){for(l=t,u=r,n=0;!d&&c&&!a&&n<s.length;n++){var a,o=s[n],v=f.p,p=o[2];t>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=v&&((a=t<2&&v<o[1])?(l=0,f.v=r,f.n=o[1]):v<p&&(a=t<3||o[0]>r||r>p)&&(o[4]=t,o[5]=r,f.n=p,l=0))}if(a||t>1)return i;throw d=!0,r}return function(a,s,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&v(s,p),l=s,u=p;(n=l<2?e:u)||!d;){o||(l?l<3?(l>1&&(f.n=-1),v(l,u)):f.n=u:f.v=u);try{if(c=2,o){if(l||(a="next"),n=o[a]){if(!(n=n.call(o,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,l<2&&(l=0)}else 1===l&&(n=o.return)&&n.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((n=(d=f.n<0)?u:t.call(r,f))!==i)break}catch(n){o=e,l=1,u=n}finally{c=1}}return{value:n,done:d}}}(t,o,l),!0),s}var i={};function c(){}function s(){}function d(){}n=Object.getPrototypeOf;var f=[][o]?n(n([][o]())):(r(n={},o,function(){return this}),n),v=d.prototype=c.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,l,"GeneratorFunction")),e.prototype=Object.create(v),e}return s.prototype=d,r(v,"constructor",d),r(d,"constructor",s),s.displayName="GeneratorFunction",r(d,l,"GeneratorFunction"),r(v),r(v,l,"Generator"),r(v,o,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(t=function(){return{w:u,m:p}})()}function r(e,n,t,a){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}r=function(e,n,t,a){function l(n,t){r(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(l("next",0),l("throw",1),l("return",2))},r(e,n,t,a)}function a(e,n,t,r,a,o,l){try{var u=e[o](l),i=u.value}catch(e){return void t(e)}u.done?n(i):Promise.resolve(i).then(r,a)}function o(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var l=e.apply(n,t);function u(e){a(l,r,o,u,i,"next",e)}function i(e){a(l,r,o,u,i,"throw",e)}u(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./index-legacy90.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./useController-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387"],function(n,r){"use strict";var a,l,u,i,c,s,d,f,v,p,m,h,w,b,y,g,_,k,x,j,I,O,C,D,S,V,z,E,A,G,T,q,P,B,U,F,M;return{setters:[function(e){a=e.u,l=e.r,u=e.bm,i=e.bn,c=e.bo,s=e.q,d=e.bg,f=e.j,v=e.c,p=e.H,m=e.bp,h=e.b,w=e.e},function(e){b=e._},function(e){y=e.B},function(e){g=e.c,_=e.r,k=e.k,x=e.p,j=e.aQ,I=e.G,O=e.q,C=e.M,D=e.A,S=e.e,V=e.y,z=e.z,E=e.J,A=e.H,G=e.x,T=e.O,q=e.v,P=e.B,B=e.C,U=e.I,F=e.F},function(e){M=e.b},null],execute:function(){var r={class:"flex !justify-center !w-full items-center"},H={class:"text-[2rem] text-dark inline-block mr-2 font-bold my-[10px]"},K={key:0,class:"absolute el-form-item__error"},$={class:"flex justify-end items-center mt-6 text-[1.2rem]"},J=g({__name:"index",props:{compData:{default:function(){return{title:"",btn:"",isDialog:!0}}}},setup:function(n,w){var g=w.expose,J=a(),L=J.getGlobalInfo,N=J.payment,Q=h(),R=n,W=_(!1),X=_(null),Y=_(null),Z=_(!1),ee=_("获取验证码"),ne=k({username:"",password:"",code:""}),te=k({username:!1,password:!1,code:!1}),re=_(""),ae=_(),oe=_(),le=_(!1),ue=_({username:[{validator:function(e,n,t){var r;if(null!==(r=R.compData)&&void 0!==r&&r.title&&(le.value=!1),/^1[3456789]\d{9}$/.test(n))t();else if(""===n)t(new Error("请输入宝塔官网账号"));else{var a;if(null!==(a=R.compData)&&void 0!==a&&a.title)return le.value=!0,void t(new Error(" "));t(new Error("请输入正确的手机号"))}},trigger:["blur","change"]}],password:[{required:!0,message:"请输入密码",trigger:["blur","change"]},{validator:function(e,n,t){n.length>=8?t():t(new Error("请输入至少8位密码"))},trigger:["blur","change"]}],token:[{required:!1,message:"请输入验证码",trigger:["blur","change"]},{validator:function(e,n,t){Z.value||t(),6===n.length?t():t(new Error("请输入6位验证码,不可为空"))},trigger:["blur","change"]}]}),ie=function(){oe.value.validate(function(){var e=o(t().m(function e(n){return t().w(function(e){for(;;)switch(e.n){case 0:n&&M({isCheck:Z,userInfo:ne,userToken:re});case 1:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}())},ce=function(e){ae.value&&clearInterval(ae.value);var n=function(){if(--e<=0)return clearInterval(ae.value),ee.value="获取验证码",void(te.code=!1);ee.value="重新获取验证码(".concat(e,"s)")};n(),ae.value=setInterval(n,1e3),te.code=!0},se=function(){var e=o(t().m(function e(){var n;return t().w(function(e){for(;;)switch(e.n){case 0:if(ne.username&&ne.password){e.n=1;break}return Q.error("请先输入手机号和密码"),e.a(2);case 1:return te.username=!0,te.password=!0,ce(60),e.n=2,u({username:ne.username,token:re.value});case 2:n=e.v,Q.request(n);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),de=function(){var e=o(t().m(function e(){var n,r,a;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return W.value=!0,e.p=1,e.n=2,i();case 2:(n=e.v).status&&(r=window.screen.width/2-300,a=window.screen.height/2-250,X.value=window.open(n.msg.replace("login.html","new/wxBindPanel.html"),"_blank","width=".concat(600,",height=").concat(500,",left=").concat(r,",top=").concat(a)),window.addEventListener("message",function(e){var n;switch(e.data.type){case"wechat_auth_error":Q.error(e.data.msg);try{var t;null===(t=X.value)||void 0===t||t.close(),de()}catch(l){}break;case"wechat_auth_complete":var r=e.data.data,a=r.code,o=r.state;null===(n=X.value)||void 0===n||n.close(),fe(a,o)}})),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,W.value=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=o(t().m(function e(n,r){var a,o,l;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return a=Q.load("正在配置面板用户信息,请稍后..."),e.p=1,e.n=2,c({code:n,state:r});case 2:(o=e.v).status?(Q.success("微信绑定成功"),window.location.href=(null===(l=R.compData)||void 0===l?void 0:l.redirect)||"/"):Q.error(o.msg||"微信绑定失败"),e.n=4;break;case 3:e.p=3,e.v,Q.error("微信绑定失败");case 4:return e.p=4,a.close(),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(n,t){return e.apply(this,arguments)}}(),ve=function(){oe.value.clearValidate(),Y.value&&(clearInterval(Y.value),Y.value=null),X.value&&!X.value.closed&&(X.value.close(),X.value=null)};return g({onOpen:function(){s(oe.value.$el,"username")},onCancel:ve}),x(function(){var e;null===(e=oe.value)||void 0===e||e.clearValidate(),L()}),j(function(){ae.value&&(clearInterval(ae.value),ae.value=null),Y.value&&(clearInterval(Y.value),Y.value=null),X.value&&!X.value.closed&&(X.value.close(),X.value=null)}),function(t,a){var o,u=y,i=d,c=f,s=v,h=p,w=b,g=m,_=I("focus");return O(),C(g,{ref_key:"bindUserRef",ref:oe,size:"default",rules:G(ue),model:G(ne),class:E(["bind-user-info",{"bind-form":!(null===(o=n.compData)||void 0===o||!o.title)}])},{default:D(function(){var t;return[S(i,{class:"!mb-5 flex !justify-center"},{default:D(function(){var t;return[V("div",r,[V("h3",H,z((null===(t=n.compData)||void 0===t?void 0:t.title)||"切换宝塔官网账号"),1),S(u,{placement:"top-start",width:"200",trigger:"hover",content:"宝塔面板许多功能都依赖于官网,绑定仅限于为您提供更好的面板服务体验,不涉及您服务器任何敏感信息,请放心使用。",class:"inline-block relative -top-1.5"},{reference:D(function(){return e(a[8]||(a[8]=[V("a",{class:"bt-ico-ask align-middle inline-block",href:"javascript:;"}," ? ",-1)]))}),_:1})])]}),_:1}),(O(),C(i,{key:1,prop:"username",class:E({"!mb-[3rem]":!(null===(t=n.compData)||void 0===t||!t.title)})},{default:D(function(){var t;return[A(S(c,{modelValue:G(ne).username,"onUpdate:modelValue":a[0]||(a[0]=function(e){return G(ne).username=e}),clearable:"",required:"",name:"username",placeholder:"宝塔官网账号",class:"h-[4rem] leading-[4rem] w-full",disabled:G(te).username,onKeyup:a[1]||(a[1]=T(function(e){return ie()},["enter","native"]))},null,8,["modelValue","disabled"]),[[_]]),null!==(t=n.compData)&&void 0!==t&&t.title&&G(le)?(O(),q("span",K,[a[10]||(a[10]=V("span",null,"请使用宝塔官网登录账号进行登录,若未有账号,可进行",-1)),S(s,{class:"!text-[12px]",href:"https://www.bt.cn/register"},{default:D(function(){return e(a[9]||(a[9]=[P(" 免费注册 ",-1)]))}),_:1})])):B("",!0)]}),_:1},8,["class"])),(O(),C(i,{key:2,prop:"password"},{default:D(function(){return[S(c,{modelValue:G(ne).password,"onUpdate:modelValue":a[2]||(a[2]=function(e){return G(ne).password=e}),clearable:"",required:"",type:"password",name:"password",placeholder:"密码",class:"h-[4rem] leading-[4rem] w-full","show-password":!0,disabled:G(te).password,onKeyup:a[3]||(a[3]=T(function(e){return ie()},["enter","native"]))},null,8,["modelValue","disabled"])]}),_:1})),A(S(i,{prop:"code"},{default:D(function(){return[S(c,{modelValue:G(ne).code,"onUpdate:modelValue":a[4]||(a[4]=function(e){return G(ne).code=e}),clearable:"",placeholder:"验证码",type:"text",onKeyup:a[5]||(a[5]=T(function(e){return ie()},["enter","native"]))},{append:D(function(){return[S(h,{class:"relative top-0 rounded-none rounded-r-[3px] w-full !h-[auto]",size:"large",type:"primary",disabled:G(te).code,plain:"",onClick:se},{default:D(function(){return[P(z(G(ee)),1)]}),_:1},8,["disabled"])]}),_:1},8,["modelValue"])]}),_:1},512),[[U,G(Z)]]),S(h,{type:"primary",class:"w-[100%] mt-[1.2rem]",size:"large",onClick:a[6]||(a[6]=function(e){return ie()})},{default:D(function(){var e,t;return[P(z((null===(e=n.compData)||void 0===e?void 0:e.btn)||(null!==(t=n.compData)&&void 0!==t&&t.title?"绑定账号":"切换账号")),1)]}),_:1}),V("div",$,[G(N).bindUser?B("",!0):(O(),q(F,{key:0},[S(s,{onClick:a[7]||(a[7]=function(e){return l.push("/"),void ve()})},{default:D(function(){return e(a[11]||(a[11]=[P("暂不绑定",-1)]))}),_:1}),S(w)],64)),S(s,{href:"https://www.bt.cn/register"},{default:D(function(){return e(a[12]||(a[12]=[P("注册账号",-1)]))}),_:1}),S(w),S(s,{href:"https://www.bt.cn/login.html?page=reset"},{default:D(function(){return e(a[13]||(a[13]=[P("忘记密码",-1)]))}),_:1}),S(w),S(s,{href:"https://www.bt.cn/bbs"},{default:D(function(){return e(a[14]||(a[14]=[P("问题反馈",-1)]))}),_:1})]),a[16]||(a[16]=V("div",{class:"divider-container"},[V("div",{class:"divider-line"}),V("div",{class:"divider-text"},"第三方登录"),V("div",{class:"divider-line"})],-1)),V("div",{class:"flex justify-center items-center mt-2"},[V("div",{class:"wechat-login-container",onClick:de},e(a[15]||(a[15]=[V("div",{class:"wechat-icon-circle"},[V("i",{class:"wechat-icon"},[V("svg",{t:"1749545795651",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9096",width:"20",height:"20"},[V("path",{d:"M391.95 175.27c-159.03 0-289.29 108.4-289.29 246.04 0 79.45 43.35 144.67 115.74 195.2l-28.93 87.05 101.12-50.74c36.19 7.19 65.22 14.54 101.33 14.54 9.08 0 18.09-0.45 27.01-1.16-5.64-19.37-8.92-39.61-8.92-60.62 0-126.32 108.54-228.89 245.97-228.89 9.37 0 18.64 0.69 27.86 1.71C658.8 261.87 534.2 175.27 391.95 175.27z m-93.97 195.31c-21.67 0-43.56-14.52-43.56-36.21 0-21.77 21.89-36.09 43.56-36.09s36.12 14.33 36.12 36.09c-0.02 21.69-14.45 36.21-36.12 36.21z m202.46 0c-21.69 0-43.45-14.52-43.45-36.21 0-21.77 21.76-36.09 43.45-36.09 21.79 0 36.21 14.33 36.21 36.09 0 21.69-14.43 36.21-36.21 36.21z m0 0",fill:"#3CB034","p-id":"9097"}),V("path",{d:"M920.01 602.12c0-115.59-115.74-209.86-245.72-209.86-137.64 0-246.05 94.27-246.05 209.86 0 115.84 108.41 209.92 246.05 209.92 28.81 0 57.85-7.25 86.79-14.51l79.36 43.44-21.76-72.3c58.06-43.53 101.33-101.3 101.33-166.55z m-325.5-36.14c-14.41 0-28.95-14.31-28.95-28.92 0-14.44 14.54-28.96 28.95-28.96 21.89 0 36.21 14.52 36.21 28.96 0 14.61-14.33 28.92-36.21 28.92z m159.13 0c-14.31 0-28.74-14.31-28.74-28.92 0-14.44 14.43-28.96 28.74-28.96 21.67 0 36.21 14.52 36.21 28.96 0 14.61-14.54 28.92-36.21 28.92z m0 0",fill:"#3CB034","p-id":"9098"})])])],-1)])))])]}),_:1},8,["rules","model","class"])}}});n("default",w(J,[["__scopeId","data-v-7b7cb142"]]))}}})}();
Save File
Cancel